From: Wei Liu Date: Thu, 6 Apr 2017 18:33:36 +0000 (+0100) Subject: xen: use a dummy file in C99 header check X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~2300 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=e9a5d40a20ec598736570db774d87cd9166d5245;p=xen.git xen: use a dummy file in C99 header check The check builds header file as if it is a C file. Clang doesn't like the idea of having dead code in C file. The check as-is fails on Clang with unused function warnings. Use a dummy file like the C++ header check to fix this. Signed-off-by: Wei Liu Acked-by: Andrew Cooper --- diff --git a/xen/include/Makefile b/xen/include/Makefile index 65a732a707..cd271dde0a 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -111,9 +111,10 @@ headers.chk: $(PUBLIC_ANSI_HEADERS) Makefile headers99.chk: $(PUBLIC_C99_HEADERS) Makefile rm -f $@.new $(foreach i, $(filter %.h,$^), \ - $(CC) -x c -std=c99 -Wall -Werror \ - -include stdint.h $(foreach j, $($(i)-prereq), -include $(j).h) \ - -S -o /dev/null $(i) \ + echo "#include "\"$(i)\" \ + | $(CC) -x c -std=c99 -Wall -Werror \ + -include stdint.h $(foreach j, $($(i)-prereq), -include $(j).h) \ + -S -o /dev/null - \ || exit $$?; echo $(i) >> $@.new;) mv $@.new $@